package com.qin.mall.openfeign.product;

import com.qin.mall.common.api.CommonResult;
import com.qin.mall.domain.PmsSkuStock;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author Leisure
 * create 2022 2022/11/19 10:46
 **/
@FeignClient("product-manage")
public interface SkuStockFeigin {

    //根据产品id和skuCode模糊搜索
    @GetMapping("/sku$/{pid}")
    public CommonResult<List<PmsSkuStock>> getStock(@PathVariable Long pid, 
                                                    @RequestParam(value = "keyword",required = false) String keyword);

    //更新库存
    @PostMapping("sku$/update$/{pid}")
    @ResponseBody
    public CommonResult updateStock(@PathVariable Long pid,
                                    @RequestBody List<PmsSkuStock> skuStockList);



}
